# -*- coding: utf-8 -*-
"""
Created on Fri Sep  3 15:20:19 2021

@author: 刘长奇-2019300677
"""
first=['1','2','3','4']
second=['1','2','3','4']
third=['1','2','3','4']
num=0
for i in range(4):
    for j in range(4):
       for k in range(4):
           if i!=j and i!=k and j!=k:
            print(first[i]+second[j]+third[k])
            num=num+1

print('the summary number is %d' %num)